<template>
  <div class="page-card">
    <header>
      <div class="title">{{ title }}</div>
    </header>
    <div class="card-container">
      <slot />
    </div>
  </div>
</template>

<script>
export default {
  props: {
    title: {
      type: String,
      required: true
    }
  }
};
</script>

<style lang="scss" scoped>
.page-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  align-content: stretch;
  width: 100%;
  background: #fff;
  header {
    position: relative;
    height: 22px;
    background: #deebff;
    .title {
      display: inline-block;
      min-width: 100px;
      padding: 0 15px;
      height: 22px;
      line-height: 22px;
      text-align: center;
      bottom: 0;
      left: -1px;
      background: #308ae7;
      border-top-right-radius: 17px;
      font-size: 18px;
      color: #fff;
    }
  }
  .card-container {
    overflow-y: auto;
    position: relative;
    flex: 1;
  }
}
</style>
